package com.github.maojx0630.easy.translate.select.impl;


import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author 毛家兴
 * @since 2024-01-31 16:04
 */
public interface SelectMapper {

  @Select("select ${label} from ${table} where ${type}=#{typeValue} and ${value}=#{inValue}")
  String selectDict(
      @Param("typeValue") String typeValue,
      @Param("inValue") String inValue,
      @Param("label") String label,
      @Param("table") String table,
      @Param("type") String type,
      @Param("value") String value);

  @Select("select ${columnName} from ${tableName} where ${valueColumnName} = #{inValue}")
  String selectTable(
      @Param("tableName") String tableName,
      @Param("columnName") String columnName,
      @Param("valueColumnName") String valueColumnName,
      @Param("inValue") String inValue);
}
